package com.netty.tcp.ew.service.impl;

import com.netty.tcp.ew.domain.DeviceControl;
import com.netty.tcp.ew.mapper.DeviceControlMapper;
import com.netty.tcp.ew.service.IDeviceControlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 设备信息Service业务层处理
 * 
 * @author Mr.wu
 * @date 2023-11-05
 */
@Service
public class DeviceControlServiceImpl implements IDeviceControlService 
{
    @Autowired
    private DeviceControlMapper deviceControlMapper;

    /**
     * 查询设备信息
     * 
     * @param deviceId 设备信息主键
     * @return 设备信息
     */
    @Override
    public DeviceControl selectDeviceControlByDeviceId(Integer deviceId)
    {
        return deviceControlMapper.selectDeviceControlByDeviceId(deviceId);
    }

    /**
     * 查询设备信息列表
     * 
     * @param deviceControl 设备信息
     * @return 设备信息
     */
    @Override
    public List<DeviceControl> selectDeviceControlList(DeviceControl deviceControl)
    {
        return deviceControlMapper.selectDeviceControlList(deviceControl);
    }

    /**
     * 新增设备信息
     * 
     * @param deviceControl 设备信息
     * @return 结果
     */
    @Override
    public int insertDeviceControl(DeviceControl deviceControl)
    {
        return deviceControlMapper.insertDeviceControl(deviceControl);
    }

    /**
     * 修改设备信息
     * 
     * @param deviceControl 设备信息
     * @return 结果
     */
    @Override
    public int updateDeviceControl(DeviceControl deviceControl)
    {
        return deviceControlMapper.updateDeviceControl(deviceControl);
    }

    /**
     * 批量删除设备信息
     * 
     * @param deviceIds 需要删除的设备信息主键
     * @return 结果
     */
    @Override
    public int deleteDeviceControlByDeviceIds(Integer[] deviceIds)
    {
        return deviceControlMapper.deleteDeviceControlByDeviceIds(deviceIds);
    }

    /**
     * 删除设备信息信息
     * 
     * @param deviceId 设备信息主键
     * @return 结果
     */
    @Override
    public int deleteDeviceControlByDeviceId(Integer deviceId)
    {
        return deviceControlMapper.deleteDeviceControlByDeviceId(deviceId);
    }

    /**
     * 批量查询设备信息信息
     *
     * @param deviceIds 设备信息主键
     * @return 结果
     */
    @Override
    public List<DeviceControl> selectDeviceControlByDeviceIds(Integer[] deviceIds)
    {
        return deviceControlMapper.selectDeviceControlByDeviceIds(deviceIds);
    }
}
